package be.jaisy.osgi.util;

import java.text.SimpleDateFormat;
import java.util.Date;

public class DateHelper {
	private static final String DATE_FORMAT_EXPR = "dd/MM/yyyy HH:mm:ss:S";
	private static final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat(DATE_FORMAT_EXPR);
	
	public static String getTime(long time){
		return DATE_FORMAT.format(new Date(time));
	}
	
	public static String getTime(Date date){
		return DATE_FORMAT.format(date);
	}
	
	public static String getTime(){
		return DATE_FORMAT.format(new Date());
	}
}
